package chapter13;

import java.util.Scanner;
public class Triangle  extends GeometricObject{
    private double a;
    private double b;
    private double c;
    public double getA(){
        return this.a;
    }
    public double getB() {
        return this.b;
    }
    public double getC() {
        return this.c;
    }
    public void setA(double a) {
        this.a=a;
    }
    public void setB(double b) {
        this.b=b;
    }
    public void setC(double c) {
        this.c=c;
    }
    public double Area() {
        double p;
        p=(a+b+c)/2;
        return Math.sqrt(p*(p-a)*(p-b)*(p-c));
    }
    public double perimeter() {
        return a+b+c;
    }
    public Triangle(double a,double b,double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }
    public double getArea() {
        return Area();
    }

    public double getPerimeter() {
        return perimeter();
    }

}


